package com.hc.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hc.common.bean.PageBean;
import com.hc.domain.Order;
import com.hc.res.OrderRes;

import java.util.List;

/**
 * @author hecai
 * @date 2021/12/20 9:51
 */
public interface OrderService extends IService<Order> {


    /**
     * 提交订单
     *
     * @param addId
     * @param payType
     * @param skuIds
     * @return
     */
    boolean buy(Long addId, Integer payType, List<Integer> skuIds);

    /**
     * 根据用户编号和订单的状态查询订单信息
     *
     * @param userId
     * @param status
     * @return
     */
    PageBean<OrderRes> getOrderByUserId(Integer userId, Integer status, Integer pageNum, Integer pageSize);
}